#include "devices.h"

#include <stdio.h>
#include <string>


#include "a4print.h"


using namespace std;

int main()
{
	cout << "Hello demo a4print.\n" << endl;

	int num = 0;
	a4print::set_printer_num(num);

	int len = a4print::init();

	if(len){
		cout << "a4print name is : null\n" << endl;
		return 0;
	}

	char * data = a4print::getInfo();

	printf("a4info is : %s\n", data);
	free(data);

	int err = a4print::getStatus();
	printf("a4 status is : %d\n", err);

	//a4print::printA4("/home/zpf/test.pdf", 0, 0, 0, 0, 0, 0, 0);

	// std::string printer;
	// printer.resize(256);
	// char *name = (char*)printer.data();
	// a4print::GetPrinterName(&name, 256);
	// cout << "a4print name is : " << name << "\n" << endl;

	//int status = a4print::GetPrinterStatus();
	//cout << "a4print status is : " << status << "\n" << endl;

	return 0;
}
